<!DOCTYPE html>
 <html>
 <head>
 <meta http-equiv="X-UA-Compatible" content="IE=edge">
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
 <% include("/WEB-INF/view/console/common/css.html"){}	%>
 <% include("/WEB-INF/view/console/common/js.html"){} 	%>
 <title></title>
 </head>
 <body> <nav class="navbar navbar-default navbar-fixed-top site-navbar" >
  <div class="navbar-header">
 <a class="navbar-brand" href="#">boProxyOrder</a>
 </div>
  </nav>
 <form name="boProxyOrder_form"  id="boProxyOrder_form" class="form-horizontal" style="margin-top: 60px;">
 <div class="form-group">
 <label class="control-label col-sm-2">线下支付类型</label>
 <div class="col-sm-6">
 	<select class="form-control" id="orderPayXxType"
 		name="orderPayXxType" check-type="required">
 	<option selected='selected' value="1">微信</option>
 	<option  value="2">支付宝</option>
 	<option  value="3">现金</option>
 	<option  value="4">银行</option>
 	<option  value="5">赊销</option>
 	<option  value="6">代销</option>

 </select>
 </div>
 </div>
 	<script type="text/javascript">
   $(function($) {
 	$("#orderPayXxType").val("${boProxyOrder.orderPayXxType!}");
 	if('${boProxyOrder.orderPayXxType!}'==''){
 	    $("#orderPayXxType").val('1');
 	}
    });
 	</script>
 <div class="form-group">
 <label class="control-label col-sm-2">销售渠道</label>
 <div class="col-sm-6">
 	<select class="form-control" id="orderSellChannel"
 		name="orderSellChannel" check-type="required">
        <option  value="1">代理商</option>
        <option  value="2">书店</option>
        <option  value="3">个人</option>
        <option  value="4">公司员工</option>
        <option  value="5">京东</option>
        <option  value="6">淘宝</option>
        <option  value="7">当当</option>
        <option  value="8">亲宝宝</option>
 </select>
 </div>
 </div>
 	<script type="text/javascript">
   $(function($) {
 	$("#orderSellChannel").val("${boProxyOrder.orderSellChannel!}");
 	if('${boProxyOrder.orderSellChannel!}'==''){
 	    $("#orderSellChannel").val('1');
 	}
    });
 	</script>
 
   <input type='hidden' name='orderId' id='orderId' value='${boProxyOrder.orderId!}'><input type='hidden' name='common_token' id='common_token' value='${common_token!}'>
 <div class="form-group" style="margin-bottom: 60px;"></div>
 </form>
 <script type="text/javascript">
 $(function($) {
    /*开启表单验证*/
 	$("#boProxyOrder_form").validation();
 });
 /*保存*/
 function saveZqForm(){
    if ($("#boProxyOrder_form").valid() == false) {
 	    return false;
    }
    var formObject=new Object();
 formObject.orderPayXxType=$('#orderPayXxType').val()==''?null:$('#orderPayXxType').val();
 formObject.orderSellChannel=$('#orderSellChannel').val()==''?null:$('#orderSellChannel').val();
 formObject.orderId=$('#orderId').val()==''?null:$('#orderId').val();
 
    var formObjectJson = JSON.stringify(formObject);
    $.post("${ctxPath}/console/bo_proxy_order/save",
     {
           formObjectJson :formObjectJson,
 	   table_name :'boProxyOrder',
 	   common_token :$("#common_token").val()
     }, function(data) {
        $.confirm({
              title: '提示',
              content: data.message,
              autoClose: 'cancelAction|3000',
              escapeKey: 'cancelAction',
              buttons: {
                  cancelAction: {
                      text: '确定',
                      action: function () {
            parent.$("#boProxyOrder").bootstrapTable("refresh");
            parent.art.dialog.get('id-dialog-boProxyOrder').close();
                      }
                  }
              }
 		});
     });
 }
 </script>
 <nav class="navbar navbar-default navbar-fixed-bottom site-navbar" >
 <div class="container" style="padding-top:10px;padding-bottom:10px;">
 <div class="nav navbar-nav navbar-right">
 <a href="#" class="btn btn-success"  onclick='saveZqForm()'>保存 </a>
  </div>
  </div>
  </nav>
 </body>
